package com.zhuangxiaoyan.designpattern.singletonmodel;

public class SingletonDemo3 {

    private SingletonDemo3() {
    }

    /**
     * 静态内部类
     */
    private static class SingletonDemo3getInstance {
        /**
         * 赋予新的类对象
         */
        private static final SingletonDemo3 instance = new SingletonDemo3();
    }

    public static SingletonDemo3 getInstance() {
        /**
         * 对象的属性
         */
        return SingletonDemo3getInstance.instance;
    }
}
